'use strict';

const addRules = {
  name: {
    type: 'string',
    required: true,
    min: 1,
  },
  online: {
    type: 'int',
    required: false,
    min: 0,
    max: 1,
  },
  index: {
    type: 'int',
    required: true,
    min: 0,
  },
};
const editRules = {
  id: {
    type: 'int',
    required: true,
  },
  ...addRules,
};
const findRules = {
  id: {
    type: 'int',
    required: false,
  },
};
const deleteRules = {
  id: {
    type: 'int',
    required: true,
  },
};
module.exports = {
  addRules,
  editRules,
  findRules,
  deleteRules,
};
